function printInit(isVertical, left, right, top, bottom, head, tail) {
	var Factory = document.getElementById('Factory');
	if (left == undefined) {
		left = 10;
	}
	if (right == undefined) {
		right = 10;
	}
	if (top == undefined) {
		top = 10;
	}
	if (bottom == undefined) {
		bottom = 10;
	}
	if (head == undefined) {
		head = "";
	}
	if (tail == undefined) {
		tail = "";
	}
	if (!Factory.object) {
		alert("打印控件没有正确安装！");
	} else {
		try {
			Factory.printing.portrait = isVertical;
			Factory.printing.leftMargin = left;
			Factory.printing.rightMargin = right;
			Factory.printing.topMargin = top;
			Factory.printing.bottomMargin = bottom;
			Factory.printing.header = head;
			Factory.printing.footer = tail;
		}
		catch (e) {
			alert(e.message);
		}
	}
}

function doPrint()
{
	Factory.printing.Print(true);
}

function doView()
{
	Factory.printing.Preview();
}

function doOperate()
{
	Factory.printing.PageSetup();
}
